import scrapy
from scrapy import cmdline


class S1Spider(scrapy.Spider):
    name = 's1'
    allowed_domains = ['baidu.com']
    start_urls = ['http://baidu.com/']

    def parse(self, response):
        print("start===============")
        print(response.text)
        print("end")

if __name__ == '__main__':
    cmdline.execute("scrapy crawl s1".split())